# $Id: PKGBUILD 67726 2012-03-14 09:20:13Z giovanni $
# Maintainer: Justin Davis <jrcd83@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-xml-writer
_cpanname=XML-Writer
pkgver=0.615
pkgrel=1
pkgdesc="Module for writing XML documents"
arch=('any')
url="http://search.cpan.org/dist/${_cpanname}"
license=('custom')
depends=('perl')
options=('!emptydirs')
source=(http://www.cpan.org/authors/id/J/JO/JOSEPHW/${_cpanname}-$pkgver.tar.gz) 
md5sums=('c905db1c397b52455a82a45d2296fdc2')

build() {
  cd  ${srcdir}/${_cpanname}-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  ${srcdir}/${_cpanname}-$pkgver

  make install DESTDIR=${pkgdir}
  install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  find ${pkgdir} -name '.packlist' -delete
  find ${pkgdir} -name '*.pod' -delete
}
